from sklearn_benchmarks.reporting.hp_match import HPMatchReporting
reporting = HPMatchReporting(against_lib="onnx", config="config.yml")
reporting.make_report()
We assume here there is a perfect match between the hyperparameters of both librairies. For a given set of parameters and a given dataset, we compute the speedup
time scikit-learn / time onnx. For instance, a speedup of 2 means that onnx is twice as fast as scikit-learn for a given set of parameters and a given dataset.
KNeighborsClassifier_brute_force¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: algorithm=brute.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.663 | 1.000 | 0.337 |
| 2 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.757 | 0.243 |
| 4 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.757 | 0.882 | 0.125 |
| 7 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.882 | 1.000 | 0.118 |
| 8 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.757 | 0.243 |
| 10 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.882 | 0.663 | 0.219 |
| 13 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.757 | 1.000 | 0.243 |
| 14 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.922 | 0.078 |
| 16 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.663 | 0.929 | 0.266 |
| 19 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 0.896 | 1.000 | 0.104 |
| 20 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 1.000 | 0.922 | 0.078 |
| 22 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 0.922 | 0.896 | 0.026 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.144 | 0.0 | -1 | 1 | 17.218 | 0.127 | 0.663 | 0.001 | 0.001 | See | See |
| 3 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.103 | 0.0 | -1 | 5 | 0.314 | 0.007 | 1.000 | 0.036 | 0.036 | See | See |
| 6 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.121 | 0.0 | 1 | 100 | 17.078 | 0.006 | 0.882 | 0.001 | 0.001 | See | See |
| 9 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.080 | 0.0 | -1 | 100 | 0.307 | 0.007 | 1.000 | 0.037 | 0.037 | See | See |
| 12 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.218 | 0.0 | 1 | 5 | 3.767 | 0.007 | 0.896 | 0.003 | 0.003 | See | See |
| 15 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.196 | 0.0 | 1 | 1 | 0.238 | 0.004 | 1.000 | 0.047 | 0.047 | See | See |
| 18 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 2 | 0.004 | 0.0 | 0.381 | 0.0 | -1 | 1 | 3.700 | 0.031 | 0.929 | 0.001 | 0.001 | See | See |
| 21 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 2 | 0.004 | 0.0 | 0.380 | 0.0 | -1 | 5 | 0.238 | 0.004 | 1.000 | 0.018 | 0.018 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.033 | 0.165 | 0.000 | 0.002 | -1 | 1 | 0.311 | 0.007 | 1.000 | 6.528 | 6.530 | See | See |
| 2 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.024 | 0.004 | 0.000 | 0.024 | -1 | 1 | 17.034 | 0.014 | 0.757 | 0.001 | 0.001 | See | See |
| 4 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.877 | 0.023 | 0.000 | 0.003 | -1 | 5 | 17.121 | 0.025 | 0.882 | 0.168 | 0.168 | See | See |
| 5 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.023 | 0.002 | 0.000 | 0.023 | -1 | 5 | 0.317 | 0.005 | 1.000 | 0.074 | 0.074 | See | See |
| 7 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.047 | 0.004 | 0.000 | 0.002 | 1 | 100 | 0.306 | 0.008 | 1.000 | 6.701 | 6.703 | See | See |
| 8 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.020 | 0.000 | 0.000 | 0.020 | 1 | 100 | 16.894 | 0.045 | 0.757 | 0.001 | 0.001 | See | See |
| 10 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.857 | 0.019 | 0.000 | 0.003 | -1 | 100 | 17.046 | 0.139 | 0.663 | 0.168 | 0.168 | See | See |
| 11 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.024 | 0.002 | 0.000 | 0.024 | -1 | 100 | 0.317 | 0.006 | 1.000 | 0.075 | 0.075 | See | See |
| 13 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.017 | 0.003 | 0.000 | 0.002 | 1 | 5 | 0.239 | 0.006 | 1.000 | 8.432 | 8.434 | See | See |
| 14 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.020 | 0.000 | 0.000 | 0.020 | 1 | 5 | 3.725 | 0.021 | 0.922 | 0.005 | 0.005 | See | See |
| 16 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 1.152 | 0.002 | 0.001 | 0.001 | 1 | 1 | 3.773 | 0.021 | 0.929 | 0.305 | 0.305 | See | See |
| 17 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.019 | 0.000 | 0.000 | 0.019 | 1 | 1 | 0.240 | 0.004 | 1.000 | 0.078 | 0.078 | See | See |
| 19 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 1.816 | 0.032 | 0.000 | 0.002 | -1 | 1 | 0.237 | 0.005 | 1.000 | 7.646 | 7.647 | See | See |
| 20 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 0.006 | 0.005 | 0.000 | 0.006 | -1 | 1 | 3.725 | 0.009 | 0.922 | 0.002 | 0.002 | See | See |
| 22 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 2.721 | 0.030 | 0.000 | 0.003 | -1 | 5 | 3.767 | 0.010 | 0.896 | 0.722 | 0.722 | See | See |
| 23 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 0.010 | 0.005 | 0.000 | 0.010 | -1 | 5 | 0.236 | 0.004 | 1.000 | 0.042 | 0.042 | See | See |
KNeighborsClassifier_kd_tree¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: algorithm=kd_tree.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.929 | 1.000 | 0.071 |
| 2 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.946 | 0.054 |
| 4 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.946 | 0.951 | 0.005 |
| 7 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.951 | 1.000 | 0.049 |
| 8 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.946 | 0.054 |
| 10 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.951 | 0.929 | 0.022 |
| 13 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.946 | 1.000 | 0.054 |
| 14 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.911 | 0.089 |
| 16 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.929 | 0.894 | 0.035 |
| 19 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.891 | 1.000 | 0.109 |
| 20 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 1.000 | 0.911 | 0.089 |
| 22 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.911 | 0.891 | 0.020 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 2.921 | 0.092 | 0.027 | 0.0 | -1 | 1 | 109.598 | 0.000 | 0.929 | 0.027 | 0.027 | See | See |
| 3 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.562 | 0.032 | 0.022 | 0.0 | -1 | 5 | 2.599 | 0.161 | 1.000 | 1.370 | 1.373 | See | See |
| 6 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.640 | 0.059 | 0.022 | 0.0 | 1 | 100 | 107.229 | 0.000 | 0.951 | 0.034 | 0.034 | See | See |
| 9 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.566 | 0.052 | 0.022 | 0.0 | -1 | 100 | 2.583 | 0.137 | 1.000 | 1.381 | 1.382 | See | See |
| 12 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.516 | 0.080 | 0.023 | 0.0 | 1 | 5 | 0.047 | 0.017 | 0.891 | 75.383 | 80.150 | See | See |
| 15 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.571 | 0.037 | 0.022 | 0.0 | 1 | 1 | 0.005 | 0.000 | 1.000 | 709.421 | 709.599 | See | See |
| 18 | KNeighborsClassifier_kd_tree | fit | 1000 | 1000 | 2 | 0.001 | 0.001 | 0.023 | 0.0 | -1 | 1 | 0.060 | 0.001 | 0.894 | 0.012 | 0.012 | See | See |
| 21 | KNeighborsClassifier_kd_tree | fit | 1000 | 1000 | 2 | 0.001 | 0.000 | 0.029 | 0.0 | -1 | 5 | 0.005 | 0.000 | 1.000 | 0.110 | 0.111 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.827 | 0.991 | 0.000 | 0.001 | -1 | 1 | 2.598 | 0.183 | 1.000 | 0.318 | 0.319 | See | See |
| 2 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.003 | 0.000 | 0.000 | 0.003 | -1 | 1 | 107.842 | 0.000 | 0.946 | 0.000 | 0.000 | See | See |
| 4 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 1.027 | 0.278 | 0.000 | 0.001 | -1 | 5 | 108.026 | 0.000 | 0.951 | 0.010 | 0.010 | See | See |
| 5 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.003 | 0.001 | 0.000 | 0.003 | -1 | 5 | 2.599 | 0.155 | 1.000 | 0.001 | 0.001 | See | See |
| 7 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 5.487 | 0.359 | 0.000 | 0.005 | 1 | 100 | 2.590 | 0.147 | 1.000 | 2.118 | 2.122 | See | See |
| 8 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.003 | 0.001 | 0.000 | 0.003 | 1 | 100 | 107.248 | 0.000 | 0.946 | 0.000 | 0.000 | See | See |
| 10 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 3.044 | 0.124 | 0.000 | 0.003 | -1 | 100 | 108.632 | 0.000 | 0.929 | 0.028 | 0.028 | See | See |
| 11 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.005 | 0.001 | 0.000 | 0.005 | -1 | 100 | 2.580 | 0.143 | 1.000 | 0.002 | 0.002 | See | See |
| 13 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 1.666 | 0.236 | 0.000 | 0.002 | 1 | 5 | 0.005 | 0.000 | 1.000 | 332.285 | 332.354 | See | See |
| 14 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.002 | 0.000 | 0.000 | 0.002 | 1 | 5 | 0.041 | 0.009 | 0.911 | 0.037 | 0.038 | See | See |
| 16 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.893 | 0.181 | 0.000 | 0.001 | 1 | 1 | 0.060 | 0.003 | 0.894 | 14.936 | 14.954 | See | See |
| 17 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.001 | 0.000 | 0.000 | 0.001 | 1 | 1 | 0.005 | 0.000 | 1.000 | 0.225 | 0.225 | See | See |
| 19 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.025 | 0.014 | 0.001 | 0.000 | -1 | 1 | 0.005 | 0.000 | 1.000 | 4.983 | 4.984 | See | See |
| 20 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 0.002 | 0.000 | 0.000 | 0.002 | -1 | 1 | 0.038 | 0.001 | 0.911 | 0.052 | 0.052 | See | See |
| 22 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.022 | 0.001 | 0.001 | 0.000 | -1 | 5 | 0.038 | 0.001 | 0.891 | 0.595 | 0.595 | See | See |
| 23 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 0.002 | 0.000 | 0.000 | 0.002 | -1 | 5 | 0.005 | 0.000 | 1.000 | 0.367 | 0.367 | See | See |
HistGradientBoostingClassifier_best¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: learning_rate=0.01, n_iter_no_change=10.0, max_leaf_nodes=100.0, max_bins=255.0, min_samples_leaf=100.0, max_iter=300.0.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | HistGradientBoostingClassifier_best | predict | 100000 | 1000 | 100 | 0.824 | 1.0 | 0.176 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | n_iter | iteration_throughput | latency | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | HistGradientBoostingClassifier_best | fit | 100000 | 100000 | 100 | 91.494 | 0.0 | 300 | 0.001 | 0.001 | 0.503 | 0.019 | 0.824 | 181.965 | 182.089 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | n_iter | iteration_throughput | latency | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | HistGradientBoostingClassifier_best | predict | 100000 | 1000 | 100 | 0.108 | 0.001 | 300 | 0.007 | 0.0 | 0.41 | 0.012 | 1.0 | 0.263 | 0.263 | See | See |